<?
//引入所有子系统信息
include_once("../../../common/script/extender_import.php");

//获取板块的设置
include_once("module/setting.php");


//根据筛选框传递过来的内容，组装查找语句
include_once("script/set_condition.php");


//根据页面信息，组装查找语句
include_once("script/set_page.php");


//根据页面数量信息，筛选信息，创造url，供页码使用
include_once("script/set_url.php");




 $_plate=select_one_line_all_items($table_Prefix."plate","mid = 'department'");

 //$department_list=cat_list(0, 0, false);

 $principal_list=select_lines_all_items($table_Prefix."employee","nid desc","","0");


 //按结构输出部门的树
 $brand_list=select_lines_all_items($table_prefix."brand","nid desc","parent_id = 0","");

 //$brand_list=transform_2darray_in_1darray_number_as_key($brand_list,"name");

 //循环，查找数据库中，parent_nid = 当前的 nid的值
 foreach($brand_list as $key=>$value)
 {
  $brand_list[$key][$value['name']]=select_lines_all_items($table_prefix."brand","listorder desc,name asc,nid desc",
      "parent_id = '{$value['nid']}'","");

  //循环，$brand_list[$key]['grade'] 的数据，查找数据库中，parent_nid = 当前的 nid的值，记录在class
  foreach($brand_list[$key][$value['name']] as $k=>$v){
   $brand_list[$key][$value['name']][$k][$v['name']]=select_lines_all_items($table_prefix."brand",
       "listorder desc,name asc,nid desc","parent_id = '{$v['nid']}'","");
  }
 }


 $department_list=$brand_list;



?>

